package com.reworkssm.mybatisdemo.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class Product implements Serializable {

  private static final long serialVersionUID = -7492639752670189553L;
  public String productId;
  private String description;
  private String descriptionImage;
  private String descriptionText;
  private long stockCount; //剩余库存数量

  public long getStockCount() {
    return stockCount;
  }

  public void setStockCount(long stockCount) {
    this.stockCount = stockCount;
  }

  public String getDescriptionImage() {
    return descriptionImage;
  }

  public void setDescriptionImage(String descriptionImage) {
    this.descriptionImage = descriptionImage;
  }

  public String getDescriptionText() {
    return descriptionText;
  }

  public void setDescriptionText(String descriptionText) {
    this.descriptionText = descriptionText;
  }

  public String getProductId() {
    return productId;
  }

  public void setProductId(String productId) {
    this.productId = productId;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public String toString() {
    return getName();
  }


  //pojo.product
  private Integer id;

  private Integer categoryId;

  private String name;

  private String subtitle;

  private String mainImage;

  private String subImages;

  private String detail;

  private BigDecimal price;

  private Integer stock;

  private Integer status;

  private Date createTime;

  private Date updateTime;

  public Product(Integer id, Integer categoryId, String name, String subtitle, String mainImage, String subImages, String detail, BigDecimal price, Integer stock, Integer status, Date createTime, Date updateTime) {
    this.id = id;
    this.categoryId = categoryId;
    this.name = name;
    this.subtitle = subtitle;
    this.mainImage = mainImage;
    this.subImages = subImages;
    this.detail = detail;
    this.price = price;
    this.stock = stock;
    this.status = status;
    this.createTime = createTime;
    this.updateTime = updateTime;
  }

  public Product() {
    super();
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public Integer getCategoryId() {
    return categoryId;
  }

  public void setCategoryId(Integer categoryId) {
    this.categoryId = categoryId;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name == null ? null : name.trim();
  }

  public String getSubtitle() {
    return subtitle;
  }

  public void setSubtitle(String subtitle) {
    this.subtitle = subtitle == null ? null : subtitle.trim();
  }

  public String getMainImage() {
    return mainImage;
  }

  public void setMainImage(String mainImage) {
    this.mainImage = mainImage == null ? null : mainImage.trim();
  }

  public String getSubImages() {
    return subImages;
  }

  public void setSubImages(String subImages) {
    this.subImages = subImages == null ? null : subImages.trim();
  }

  public String getDetail() {
    return detail;
  }

  public void setDetail(String detail) {
    this.detail = detail == null ? null : detail.trim();
  }

  public BigDecimal getPrice() {
    return price;
  }

  public void setPrice(BigDecimal price) {
    this.price = price;
  }

  public Integer getStock() {
    return stock;
  }

  public void setStock(Integer stock) {
    this.stock = stock;
  }

  public Integer getStatus() {
    return status;
  }

  public void setStatus(Integer status) {
    this.status = status;
  }

  public Date getCreateTime() {
    return createTime;
  }

  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
  }

  public Date getUpdateTime() {
    return updateTime;
  }

  public void setUpdateTime(Date updateTime) {
    this.updateTime = updateTime;
  }
}
